home *** CD-ROM | disk | FTP | other *** search
/ Exploring Aeronautics / NASA Exploring Aeronautics.iso / pc / source / main.dxr / 00001_main.ls next >
Encoding:
Text File  |  1998-06-02  |  1.8 KB  |  54 lines

  1. global gMain, gRollManager, gButtonManager, gTipList, gSoundManager, gATC, gVoid, gPopUp
  2.  
  3. on startMovie
  4.   initMain()
  5.   set nasaHandler to "mShowPopUp(gPopUp," & QUOTE & "nasaPopUp" & QUOTE & ")"
  6.   mClearButtons(gButtonManager)
  7.   mAddButton(gButtonManager, 35, "u2flyButton", "goFly")
  8.   mAddButton(gButtonManager, 36, "toolsButton", "mGoToMovie(gMain, #tools)")
  9.   mAddButton(gButtonManager, 37, "hangarButton", "mGoToMovie(gMain, #hangar)")
  10.   mAddButton(gButtonManager, 38, "visitorButton", "mGoToMovie(gMain, #visitor)")
  11.   mAddButton(gButtonManager, 39, "activButton", "mGoToMovie(gMain, #activity)")
  12.   mAddButton(gButtonManager, 40, "exitButton", "mQuit(gMain)")
  13.   mAddButton(gButtonManager, 41, "bigNasaButton", nasaHandler)
  14.   mAddButton(gButtonManager, 20, "b2Button", "mClickedAircraft(gATC, the clickOn)")
  15.   mAddButton(gButtonManager, 21, "f14Button", "mClickedAircraft(gATC, the clickOn)")
  16.   mAddButton(gButtonManager, 22, "sr71Button", "mClickedAircraft(gATC, the clickOn)")
  17.   set gTipList to []
  18.   repeat with i = 1 to 5
  19.     add(gTipList, new(script "tipObjectScript", 34 + i, 9 + i))
  20.   end repeat
  21.   set gATC to new(script "airTrafficControlObjectScript")
  22.   set gPopUp to new(script "popUpObjectScript", 46)
  23.   put "popUp created"
  24. end
  25.  
  26. on stopMovieScript
  27.   mClearButtons(gButtonManager)
  28.   repeat with aTip in gTipList
  29.     mdispose(aTip)
  30.   end repeat
  31.   set gTipList to gVoid
  32.   set gATC to gVoid
  33. end
  34.  
  35. on goFly
  36.   mReset(gRollManager)
  37.   mStopBackgroundLoop(gSoundManager)
  38.   mPuppetSound(gSoundManager, "jetBlast")
  39.   mClearForTakeOff(gATC)
  40.   mGoToMovie(gMain, #fly)
  41. end
  42.  
  43. on showSF
  44.   puppetSprite(6, 1)
  45.   set the member of sprite 6 to member "SF loop"
  46.   updateStage()
  47.   set the mouseDownScript to "hideSF"
  48. end
  49.  
  50. on hideSF
  51.   set the member of sprite 6 to member "dummyPixel"
  52.   set the mouseDownScript to EMPTY
  53. end
  54.